/*
 * @Author: Robin
 * @Date: 2020-12-02 17:15:46
 * @LastEditors: Robin
 * @LastEditTime: 2020-12-02 17:34:19
 * @Description: Description
 */
package main

import (
	"fmt"

	"github.com/google/uuid"
)

func main() {
	for i := 0; i < 10; i++ {
		id := uuid.New()
		fmt.Printf("%s %s\n", id, id.Version().String())
	}

	for i := 0; i < 10; i++ {
		id2, err := uuid.NewRandom()
		if err != nil {
			fmt.Printf("%v\n", err)
		}
		fmt.Printf("%s %s\n", id2, id2.Version().String())
	}

	id := uuid.New()
	for i := 0; i < 10; i++ {
		id3 := uuid.NewMD5(id, []byte("123"))
		id4 := uuid.NewSHA1(id, []byte("123"))
		fmt.Printf("%s %s\n", id3, id3.Version().String())
		fmt.Printf("%s %s\n", id4, id4.Version().String())
	}

}
